package com.huashi.dealer.modular.business.cart.param;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * API购物车请求参数
 *
 * @author 谭陈强
 * @since 2025-07-30
 */
@Data
@Schema(description = "API购物车请求参数")
public class CartRequestParam {

    @Schema(description = "用户令牌")
    private String token;

    @Schema(description = "商品ID")
    private Long goodsId;

    @Schema(description = "商品数量")
    private Integer goodsNum;

    @Schema(description = "商品SKU ID")
    private Long goodsSkuId;

    @Schema(description = "分类类型：10普通订单，30返利订单，40核销订单")
    private Integer isGoodsType;

    @Schema(description = "购物车ID")
    private Long cartId;

    @Schema(description = "商品名称")
    private String goodsName;

    @Schema(description = "商品图片")
    private String goodsImage;

    @Schema(description = "商品价格")
    private BigDecimal goodsPrice;

    @Schema(description = "商品规格")
    private String goodsSpec;

    @Schema(description = "商品分类ID")
    private Long categoryId;

    @Schema(description = "商品卖点")
    private String sellingPoint;

    @Schema(description = "商品条形码")
    private String barCode;

    @Schema(description = "商品规格类型：10单规格，20多规格")
    private Integer specType;

    @Schema(description = "库存计算方式：10下单减库存，20付款减库存")
    private Integer deductStockType;

    @Schema(description = "商品排序")
    private Integer goodsSort;

    @Schema(description = "配送模板ID")
    private Long deliveryId;

    @Schema(description = "是否开启积分赠送：1开启，0关闭")
    private Integer isPointsGift;

    @Schema(description = "是否允许使用积分抵扣：1允许，0不允许")
    private Integer isPointsDiscount;

    @Schema(description = "是否开启等级权益：1开启，0关闭")
    private Integer isEnableGrade;

    @Schema(description = "是否独立等级权益：1是，0否")
    private Integer isAloneGrade;

    @Schema(description = "独立等级权益")
    private String aloneGradeEquity;

    @Schema(description = "是否独立经销商：1是，0否")
    private Integer isIndDealer;

    @Schema(description = "经销商金额类型")
    private Integer dealerMoneyType;

    @Schema(description = "一级金额")
    private BigDecimal firstMoney;

    @Schema(description = "二级金额")
    private BigDecimal secondMoney;

    @Schema(description = "三级金额")
    private BigDecimal thirdMoney;

    @Schema(description = "商品状态")
    private Integer goodsStatus;

    @Schema(description = "商品类型")
    private Integer isType;

    @Schema(description = "商品内容")
    private String content;

    @Schema(description = "商品列表")
    private List<CartGoodsParam> goodsList;

    @Data
    @Schema(description = "购物车商品参数")
    public static class CartGoodsParam {
        @Schema(description = "商品ID")
        private Long goodsId;

        @Schema(description = "商品SKU ID")
        private Long goodsSkuId;

        @Schema(description = "商品数量")
        private Integer goodsNum;

        @Schema(description = "商品名称")
        private String goodsName;

        @Schema(description = "商品图片")
        private String goodsImage;

        @Schema(description = "商品价格")
        private BigDecimal goodsPrice;

        @Schema(description = "商品规格")
        private String goodsSpec;

        @Schema(description = "商品分类ID")
        private Long categoryId;
    }
} 